/* 团队页面样式 */
.team-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.team-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.team-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: bold;
}

.team-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 1.1em;
}

.invite-section, .qr-code-section, .team-members, .commissions-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* 二维码区域特殊样式 */
.qr-code-section {
    position: relative;
}

.section-description {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    text-align: center;
}

.qr-display-area {
    text-align: center;
    margin-bottom: 25px;
}

.qr-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.qr-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.qr-info-item:last-child {
    margin-bottom: 0;
}

.qr-info-label {
    font-weight: bold;
    color: #333;
    font-size: 0.9em;
}

.qr-info-value {
    color: #667eea;
    font-size: 0.9em;
    word-break: break-all;
}

.qr-url {
    font-family: monospace;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
}

.section-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.invite-code {
    background: #f8f9fa;
    border: 2px dashed #667eea;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.invite-code-text {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.invite-link-container {
    margin-top: 20px;
}

.invite-link-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.qr-code-image {
    max-width: 300px;
    max-height: 300px;
    border: 3px solid #667eea;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.qr-code-image:hover {
    transform: scale(1.05);
}

.qr-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qr-actions-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.qr-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.qr-btn.primary {
    background: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.qr-btn.primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.qr-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.qr-btn.secondary {
    background: #6c757d;
}

.qr-btn.secondary:hover {
    background: #5a6268;
}

.usage-instructions {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.instructions-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.1em;
    text-align: center;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.instruction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.instruction-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
}

.instruction-text {
    flex: 1;
}

.instruction-text strong {
    display: block;
    color: #333;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.instruction-text p {
    margin: 0;
    color: #666;
    font-size: 0.8em;
    line-height: 1.4;
}

.qr-status {
    margin-top: 20px;
    text-align: center;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #d4edda;
    color: #155724;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid #c3e6cb;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-indicator.status-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status-indicator.status-success .status-dot {
    background: #28a745;
}

.status-indicator.status-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.status-indicator.status-error .status-dot {
    background: #dc3545;
}

.status-indicator.status-loading {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.status-indicator.status-loading .status-dot {
    background: #17a2b8;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.member-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.member-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.member-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.member-join-date {
    color: #666;
    font-size: 0.9em;
}

.member-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.member-stat {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.member-stat-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.member-stat-label {
    color: #666;
    font-size: 0.9em;
}

.commission-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.commission-item:last-child {
    border-bottom: none;
}

.commission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.commission-user {
    font-weight: bold;
    color: #333;
}

.commission-amount {
    font-weight: bold;
    color: #28a745;
}

.commission-details {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state p {
    margin: 10px 0;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .team-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .team-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .team-header h1 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .team-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2em;
    }
    
    .invite-section, .qr-code-section, .team-members, .commissions-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .invite-code-text {
        font-size: 1.3em;
        letter-spacing: 1px;
    }
    
    .copy-btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        margin-top: 15px;
    }
    
    .qr-code-image {
        max-width: 250px;
        max-height: 250px;
    }
    
    .qr-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .qr-actions-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .qr-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        margin: 0;
        min-width: auto;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .instruction-item {
        padding: 12px;
    }
    
    .qr-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .qr-info-value {
        word-break: break-all;
        font-size: 0.8em;
    }
    
    .member-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .member-stat-value {
        font-size: 1.1em;
    }
    
    .member-stat-label {
        font-size: 0.8em;
    }
    
    .back-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .invite-link-input {
        font-size: 14px;
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .usage-instructions ul {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .commission-details {
        font-size: 0.8em;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .team-container {
        padding: 5px;
    }
    
    .team-header {
        padding: 15px;
    }
    
    .team-header h1 {
        font-size: 1.5em;
    }
    
    .stat-value {
        font-size: 1.8em;
    }
    
    .invite-code-text {
        font-size: 1.2em;
    }
    
    .qr-code-image {
        max-width: 200px;
        max-height: 200px;
    }
    
    .member-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .member-stat {
        padding: 10px;
        background: #f8f9fa;
        border-radius: 8px;
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #c3e6cb;
}
